#ifndef WebServerPage_H
#define WebServerPage_H

#include "PropPage.h"

class WebServerPage : public CPropertyPage<IDD_WEBSERVERPAGE>, public PropPage
{
	public:
		WebServerPage(SettingsManager *s) : PropPage(s)
		{
			title = _tcsdup((TSTRING(SETTINGS_RC) + _T('\\') + TSTRING(WEBSERVER)).c_str());
			SetTitle(title);
			m_psp.dwFlags |= PSP_RTLREADING;
		};
		
		virtual ~WebServerPage()
		{
			free(title);
		};
		
		BEGIN_MSG_MAP(WebServerPage)
		MESSAGE_HANDLER(WM_INITDIALOG, onInitDialog)
		END_MSG_MAP()
		
		LRESULT onInitDialog(UINT, WPARAM, LPARAM, BOOL&);
		
		// Common PropPage interface
		PROPSHEETPAGE *getPSP()
		{
			return (PROPSHEETPAGE *) * this;
		}
		virtual void write();
	private:
		CComboBox BindCombo;
		
	protected:
		static Item items[];
		static TextItem texts[];
		
		TCHAR* title;
};

#endif //WebServerPage_H
